module Kata (highAndLow) where

highAndLow :: String -> String
highAndLow input = show f1 ++ " " ++ show f2
  where
    xs = map (read::String->Int) $ words input
    f1 = maximum xs
    f2 = minimum xs

-- after solution
highAndLow2 :: String -> String
highAndLow2 = unwords . map show . f . map read . words
    where
        f :: [Int] -> [Int]
        f xs = [maximum xs, minimum xs]
